{% extends '__base.tpl' %}
{% block middle %}
<div id='middle'>
    <!------------------------------轮播列表start---------------------------------->
    <div class="recommend">
        <!--轮播-->
        <div class="slide-wrap" id="banner">
            <ul class="img-wrap" id="bannerIMG">
                {%for item in data.bannerList%}
                <li>
                    <a target="_blank"
                       {% if item.linkUrl %}
                       href="{{item.linkUrl}}"
                       {% else %}
                       href="javascript:;"
                       {% endif%}>
                        <img src="{{item.img|imgPath}}">
                        <p class="content">{{item.descript}}</p>
                    </a>
                </li>
                {%endfor%}
            </ul>
            <ol class="circle-wrap">
                {%for item in data.bannerList%}
                <li>
                    <a href="javascript:;">
                        {{item.name}}
                    </a>
                </li>
                {%endfor%}
            </ol>
        </div>
    </div>
   <!------------------------------轮播列表End---------------------------------->
   <!------------------------------推荐列表start---------------------------------->
   <div class="listCon" id="middleListContent">
       <ul class="content">
           {% for item in data.videoData.list %}
           <li>
               {%if (item.imgs|imgArrarys).length > 1 %}
                {% include '__index_titleCommon_node.html'%}
               {%endif%}
               {%if (item.imgs|imgArrarys).length ==1 %}
               <div class="listConLeft">
                   <a target="_blank" href="/{{item.relatedId}}/{{item.type|subscribeUrl}}">
                       <img class="content-img" src="{{item.imgs|imgPath}}">
                   </a>
               </div>
               {%elif (item.imgs|imgArrarys).length > 1 %}
               <div class="content-img-box">
                   <a target="_blank" href="{{item.relatedId}}/{{item.type|subscribeUrl}}">
                       {% for img in (item.imgs|imgArrarys)%}
                       <img class="content-img" src="{{img|imgPath}}">
                       {%endfor%}
                   </a>
               </div>
               {%endif%}
               <div {%if (item.imgs|imgArrarys).length ==1%} class="listConRight" {%endif%}>
                   {%if (item.imgs|imgArrarys).length <= 1 %}
                        {% include '__index_titleCommon_node.html'%}
                   {%endif%}
                   <div class="desc">
                       <i class="listIcon listIcon{{item.type}}">{{item.type|subscribeType}}</i>
                       <a target="_blank" href="/{{item.memberId}}/userInfo.html">
                           {%if item.memberId %}
                           <img src="{{item.header|imgPath}}" class="userImg" />
                           {%endif%}
                           {{item.nickName}}
                       </a>
                       {%if item.type==1 or item.type==6%}· {{item.commentCount}}评论 {%endif%}
                       {%if item.type==4%}·  <span class="orange">{{item.answerCount}}回答</span>{%endif%}
                       · {{item.updateDateTime|toTimeStr}}
                   </div>
               </div>
           </li>
           {%endfor%}
       </ul>
       <div class="loading">正在加载中...</div>
       <div class="nomore-data">---到底了---</div>
   </div>
   <script id="middleListContent_tpl" type="text/html">
       <% each data as item i %>
       <li>
           <%if imgArrarys(item.imgs).length>1 %>
             {% include '__index_titleCommon_script.html'%}
           <%/if%>
           <%if imgArrarys(item.imgs).length==1 %>
           <div class="listConLeft">
               <a target="_blank" href="/<%item.relatedId%>/<%=subscribeUrl(item.type)%>">
                   <img class="content-img" src=" <%=imgPath(item.imgs)%>">
               </a>
           </div>
           <%/if%>
           <%if imgArrarys(item.imgs).length>1 %>
           <div class="content-img-box">
               <a target="_blank"  href="/<%item.relatedId%>/<%=subscribeUrl(item.type)%>">
                   <%each imgArrarys(item.imgs) as img i%>
                   <img class="content-img" src="<%=imgPath(img)%>">
                   <%/each%>
               </a>
           </div>
           <%/if%>
           <div <%if imgArrarys(item.imgs).length==1%> class="listConRight" <%/if%>>
           <%if imgArrarys(item.imgs).length<=1 %>
                {% include '__index_titleCommon_script.html'%}
           <%/if%>
           <div class="desc">
               <i class="listIcon listIcon<%item.type%>"> <%=subscribeType(item.type)%></i>
               <a target="_blank" href="/<%item.memberId%>/userInfo.html">
                   <%if item.memberId%>
                   <img src="<%=imgPath(item.header)%>" class="userImg" />
                   <%/if%>
                   <%item.nickName%>
               </a>
               <%if item.type==1 || item.type==6%>·  <%item.commentCount%>评论 <%/if%>
               <%if item.type==4%>·  <span class="orange"><%item.answerCount%>回答</span><%/if%>
               ·  <%=toTimeStr(item.updateDateTime)%>
           </div>
        </div>
       </li>
       <%/each%>
   </script>
    <!------------------------------推荐列表End---------------------------------->
</div>
{% endblock %}
{% block script %}
<!--公用js部分-->
<script src="https://connect.qq.com/qc_jssdk.js"></script>
    {{ super() }}
<!-- build:js -->
    <script src="../public/js/page/plugin/banner.js"></script>
    <script src="../public/js/page/index/index.js"></script>
<!-- endbuild -->
{% endblock %}
